#include "rightdisplay.h"
#include "informationword.h"
#include "QDebug"

rightDisplay::rightDisplay(QObject *parent) :
    QObject(parent)
{
    information_word=new informationWord();//->初始化信息字解析对象
}


//********************************************************************************
//函数名：diaplayM_SP_NA_1
//功能：解析类型标识 1
QString rightDisplay::diaplayM_SP_NA_1(const QString &data_parse, int SQ, int VSQ)
{
    QString tmp="";
    QString tmpOutput="";
    qDebug()<<"啊啊啊";
    if(SQ==1)
    {
        tmp=data_parse.right(informationNum+2*VSQ);
        tmpOutput+=information_word->parseInformationAddress( tmp.left(6));
        for(int i=1;i<=VSQ;i++)
        {
            int info=tmp.mid(2*i+informationNum-2,2).toInt(&ok,16);
                tmpOutput+=tr("\n---信息体%1---\n").arg(i)
                        +tmp.mid(2*i+informationNum-2,2)
                        +":  "
                        +information_word->pParseSIQ(info);
        }
    }else
    {

    }
    return tmpOutput;
}
